package com.casic.quality.generator.controller;

import com.casic.quality.generator.dto.BaseRuleDetail;
import com.casic.quality.generator.dto.RuleInfo;
import com.casic.quality.generator.service.GeneratorService;
import org.json.JSONObject;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * class description
 *
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2020/9/23
 */

@RestController
public class GeneratorController {
    @RequestMapping(value = "/rule/save", method = RequestMethod.POST)
    public Object ruleGenerator(@RequestBody RuleInfo ruleInfo) {
        return service.ruleGenerator(ruleInfo);
    }

    private final GeneratorService service;

    public GeneratorController(GeneratorService service) {
        this.service = service;
    }
}
